package com.example.demo.spring.ioc.case01;

import java.io.IOException;
import java.util.Properties;

/**
 * @author: htc
 * @date: Created in 13:56 2019/1/10.
 */
public class IocTest {
    public static void main(String[] args) throws IOException {
        Properties properties = Property.getPro();
        String classPath = properties.getProperty("apple");
        Fruit fruit =Factory.getInstance(classPath);
        if (fruit != null){
            fruit.eat();
        }else {
            throw new RuntimeException();
        }
    }
}
